int digitsum(unsigned int n)
{
	if (n > 9)
		return digitsum(n / 10) + n % 10;
	else
		return n;
}